package org.ubc.cs410.disposal2020.client.dto;


import java.io.Serializable;

import com.google.gwt.maps.client.geom.LatLng;
import com.google.gwt.maps.client.overlay.Marker;
import com.google.gwt.user.client.rpc.IsSerializable;

/*
 * client data object, equivalence of Robot.Class
 * To be stored on client side
 */

public class RobotDto implements Serializable {
	private String key;
	private double latitude;
	private double longitude;
	private boolean movedThisTurn = true;
	private String owner;

	public RobotDto() {}

	public void setKey(String key) {
		this.key = key;
	}

	public String getKey() {
		return key;
	}

	public void setLatitude(double latitude) {
		this.latitude = latitude;
	}

	public void setLongitude(double longitude) {
		this.longitude = longitude;
	}

	public void setOwner(String owner) {
		this.owner = owner;
	}

	public void makeMovable() {
		this.movedThisTurn = false;
	}

	public void setMoved() {
		this.movedThisTurn = true;
	}

	public boolean isMovable() {
		return !this.movedThisTurn;
	}

	public String getOwner() {
		return this.owner;
	}

	public LatLng getLocation() {
		return LatLng.newInstance(latitude, longitude);
	}

	public void setMovable(boolean movable) {
		this.movedThisTurn = !movable;

	}

}
